//
//  NavBarView.h
//  ZhiHuDaily
//
//  Created by albert on 16/8/17.
//  Copyright © 2016年 albert. All rights reserved.
//  自定义的导航条view

#import <UIKit/UIKit.h>

@interface NavBarView : UIView
/** 标题view */
@property (nonatomic, weak) UIView *titleView;

/** 标题文字 */
@property (nonatomic, copy) NSString *title;

/** 背景颜色的alpha */
@property (nonatomic, assign) CGFloat bgAlpha;

/** 左边按钮 */
@property (nonatomic, weak) UIButton *leftButton;

/** 右边按钮 */
@property (nonatomic, weak) UIButton *rightButton;

/** 默认返回按钮的文字 */
@property (nonatomic, copy) NSString *backButtonTitle;

/** 隐藏左边\返回按钮 */
@property (nonatomic, assign) BOOL leftButtonHidden;

/** 隐藏右边按钮*/
@property (nonatomic, assign) BOOL rightButtonHidden;

/** 默认返回按钮的frame */
@property (nonatomic, assign, readonly) CGRect leftButtonFrame;

/** 默认右边按钮的frame */
@property (nonatomic, assign, readonly) CGRect rightButtonFrame;

/** 标题默认center */
@property (nonatomic, assign, readonly) CGPoint defaltCenter;

/** 监听默认返回按钮点击的block */
@property (nonatomic, copy) void(^backBtnClickBlock)(UIButton *button);

/** 自定义构造方法 */
- (instancetype)initWithTitle:(NSString *)title showBackTitle:(BOOL)showBackTitle;

/** 类方法 初始化 */
+ (instancetype)barViewWithTitle:(NSString *)title showBackTitle:(BOOL)showBackTitle;

/** 类方法 初始化 */
+ (instancetype)barView;

/** 去除默认返回按钮的文字 */
- (void)deleteBackButtonTitle;

- (void)changeToNightSkin;
- (void)changeToDaySkin;
- (void)changeToNightSkinWithBgAlpha:(CGFloat)bgAlpha;
- (void)changeToDaySkinWithBgAlpha:(CGFloat)bgAlpha;
@end
